package cn.Quartz.Listener;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobListener;

public class JobListenerShopJ implements JobListener {
    @Override
    public String getName() { // !!! 不得返回null  !!!
        return "JobListenerShopJ";
    }

    @Override
    public void jobToBeExecuted(JobExecutionContext jobExecutionContext) {
//      Job 启动时的事件
    }

    @Override
    public void jobExecutionVetoed(JobExecutionContext jobExecutionContext) {
    }

    @Override
    public void jobWasExecuted(JobExecutionContext jobExecutionContext, JobExecutionException e) {
//        Job 结束 和 出现异常时的事件
//        正常 结束 e 为 null
    }
}
